package com.ocom.webapi.feign;


import com.ocom.common.constant.AiotUrl;
import com.ocom.common.resp.RespMachMessage;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "aiot")
public interface AiotClientService {



    // 3.2.SaaS平台激活(禁用)设备(SetDeviceStatusBySaas)
    // 3.2.SaaS平台激活(禁用)消费设备(SetXfDeviceStatusBySaas)
    @PostMapping(AiotUrl.Url_Aiot_SetMjDeviceStatusBySaas)
    public Result SetMjDeviceStatusBySaas(@Validated @RequestBody Map<String,Object> map);


    // 3.5.门禁设备获取升级版本信息（getMjDeviceVersion）
    @GetMapping(value = AiotUrl.URL_Aiot_GetMjDeviceVersion)
    RespMachMessage GetMjDeviceVersion(@RequestParam("deviceNo") String deviceNo, @RequestParam("versionCode") String versionCode,@RequestParam("commMode")  Integer commMode);



    @PostMapping(AiotUrl.Url_Aiot_SetXfDeviceStatusBySaas)
    public Result SetXfDeviceStatusBySaas(@Validated @RequestBody Map<String,Object> map);

}
